Query Language
The Users Service enables users to query other users using a language that is compatible with a large subset of the SCIM querying language. This language allows users to filter the list of users using a variety of operators.
Operators
Operator | Description | Example |
---|---|---|
eq | Equals: = | last_name eq "Troßbach" |
ne | Not equal: != | last_name ne "Troßbach" |
co | Contains | last_name co "oßb" |
sw | Starts with | last_name sw "Tro" |
ew | Ends with | last_name sw "bach" |
gt | Greater than | created_at gt "2023-09-19T14:39:24.444956Z" |
lt | Lower than | created_at lt "2023-09-20T14:39:24.444956Z" |
ge | Greater or equal | created_at ge "2023-09-19T14:39:24.444956Z" |
lw | Lower or equal | created_at lw "2023-09-20T14:39:24.444956Z" |
pr | Is Present | idp_workforce_id pr |
Currently the second operand can only be a literal and cannot be another field.
Logical Expressions
The querying language also supports a number of logical expression and the possiblity to chain multiple expressions.
Expression | Example |
---|---|
AND | first_name eq "Markus" AND last_name eq "Troßbach" |
OR | lifecycle eq "ACTIVE" OR lifecycle eq "INACTIVE" |
NOT | NOT(first_name eq "Markus" AND last_name eq "Troßbach") |
More Examples
-
Get all users with lifecycle value ERROR:
lifecycle eq "ERROR"
-
Get all users with lifecycle value ERROR which do not have a idp_workforce_id:
lifecycle eq "ERROR" AND NOT(idp_workforce_id pr)
-
Get users with lifecycle value PENDING or SUSPENDED
lifecycle eq "PENDING" OR lifecycle eq "SUSPENDED"
-
Get users with lifecycle value PENDING or ERROR and do not have a idp_workforce_id:
(lifecycle eq "PENDING" OR lifecycle eq "ERROR") AND NOT(idp_workforce_id pr)